<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{.Title}}</title>
    <style>
        /* 整体页面背景改为浅黄色 */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #fff9d9; /* 整体背景浅黄色 */
            color: #333;
        }
        /* 头部区域，改为浅黄色（可根据喜好调整色调） */
        .header {
            background-color: #fdf6d0; /* 浅黄色替代原来的蓝色 */
            color: #333;
            text-align: center;
            padding: 15px 20px;
        }
        .header h1 {
            margin: 0;
            font-size: 24px;
            font-weight: normal;
        }
        .container {
            width: 90%;
            max-width: 1000px;
            margin: 20px auto;
            background-color: #fff;
            border: 1px solid #ddd;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
        }
        .content {
            padding: 20px;
        }
        /* 标题部分，用绿色替代原来的蓝色 */
        .section-title {
            font-size: 18px;
            font-weight: bold;
            color: #8bc34a; /* 绿色，类似浅绿 */
            border-left: 5px solid #8bc34a; /* 绿色边框 */
            padding-left: 10px;
            margin-bottom: 15px;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }
        table, th, td {
            border: 1px solid #ddd;
        }
        th, td {
            padding: 8px 10px;
            text-align: left;
        }
        th {
            background-color: #fafafa;
        }
        ul {
            list-style: disc;
            margin-left: 20px;
            margin-bottom: 20px;
        }
        .control-panel {
            border-top: 1px solid #ddd;
            padding-top: 20px;
            margin-top: 20px;
        }
        .control-panel form {
            margin-bottom: 10px;
        }
        .control-panel label {
            display: inline-block;
            width: 80px;
            text-align: right;
            margin-right: 10px;
        }
        .control-panel input[type="password"] {
            width: 200px;
            padding: 5px;
        }
        .control-panel button {
            padding: 6px 12px;
            background-color: #8bc34a; /* 绿色按钮 */
            color: #fff;
            border: none;
            cursor: pointer;
            border-radius: 3px;
        }
        .control-panel button:hover {
            background-color: #7cb342; /* 按钮 hover 时加深绿色 */
        }
        .footer {
            text-align: center;
            padding: 10px;
            background-color: #f8f8f8;
            border-top: 1px solid #e7e7e7;
            margin-top: 20px;
        }
        /* 链接样式，去掉蓝色，改为绿色 */
        a {
            color: #8bc34a;
            text-decoration: none;
        }
        a:hover {
            color: #7cb342;
            text-decoration: underline;
        }
    </style>
</head>
<body>
<div class="header">
    <h1>{{.Title}}</h1>
</div>
<div class="container">
    <div class="content">
        <div class="section-title">
            <h2>{{.ServerName}}</h2>
        </div>
        <p>{{.ServerInfo}}</p>
        <div class="section-title">
            <h3>服务器状态</h3>
        </div>
        <table>
            {{range $key, $value := .ServerStats}}
            <tr>
                <td>{{$key}}</td>
                <td>{{$value}}</td>
            </tr>
            {{end}}
        </table>
        <div class="section-title">
            <h3>应用程序</h3>
        </div>
        <ul>
            <li><a href="/docs/">文档</a> - 服务器文档</li>
            <li><a href="/examples/">示例</a> - 示例应用</li>
            <li><a href="/manager/html">管理器</a> - 应用程序管理器</li>
        </ul>
        <div class="control-panel">
            <form action="/restart" method="post">
                <label for="password">管理员密码:</label>
                <input type="password" name="password" id="password" placeholder="输入密码重启服务器">
                <button type="submit">重启服务器</button>
            </form>
            <p>最后更新时间: {{.LastUpdated}}</p>
        </div>
    </div>
</div>
<div class="footer">
    <p>Powered by 706 kvm Demo</p>
</div>
</body>
</html>
